'use strict';

const Controller = require('egg').Controller;

class UserController extends Controller {
  async logout() {
    this.ctx.body = {
      code: 20000,
    };
  }

  async login() {
    this.ctx.body = {
      code: 20000,
      data: {
        token: 'admin-token',
      },
    };
  }

  async info() {
    this.ctx.body = { code: 20000, data: { roles: [ 'admin' ], introduction: 'I am a super administrator', avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif', name: 'Super Admin' } };
  }
}

module.exports = UserController;
